package Final;

import java.util.Scanner;

public class test27 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        if (!str.matches("^[0-9]*$")){
            System.out.println("Wrong Format");
            return;
        }
        if (str.length() % 8 != 0){
            System.out.println("Wrong Format");
            return;
        }
        String[] arr = str.split("20");
        int out = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i].startsWith("2017") || arr[i].startsWith("2061")){
                if(out == 1){
                    System.out.print(" ");
                }
                System.out.print(arr[i]);
                out = 1;
            }
        }
    }
}
